package com.cloud.pole.feign;

import java.math.BigDecimal;
import java.util.List;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import com.cloud.pole.api.user.UserAccountApi;
import com.cloud.pole.common.constant.ApiConstant;
import com.cloud.pole.common.msg.ApiRestResponse;

/*
*2019年2月21日
*cloud-shop
*author:frank-chen
*/
@FeignClient(value = ApiConstant.USER_SERVICE_ID)
public interface IUserAccountService {
	
	  @RequestMapping(value=ApiConstant.USER_SERVICE_USERACCOUNT_GETACCOUNTLIST, method = RequestMethod.GET)
	  public ApiRestResponse<List<UserAccountApi>> getAccountList(
			  @RequestParam(name="token", defaultValue = "") String token);
	  
	  @RequestMapping(value=ApiConstant.USER_SERVICE_USERACCOUNT_REDUCEBALANCE, method = RequestMethod.GET)
	  public ApiRestResponse<Integer> reduceBalance(
			  @RequestParam(name="typeId", defaultValue = "") Integer typeId,
			  @RequestParam(name="userId", defaultValue = "") Long userId,
			  @RequestParam(name="userName", defaultValue = "") String userName,
			  @RequestParam(name="objectId", defaultValue = "") String objectId,
			  @RequestParam(name="objectTypeId", defaultValue = "") Integer objectTypeId,
			  @RequestParam(name="amount", defaultValue = "") BigDecimal amount,
			  @RequestParam(name="srcUserId", defaultValue = "") Long srcUserId,
			  @RequestParam(name="srcUserName", defaultValue = "") String srcUserName,
			  @RequestParam(name="srcRealName", defaultValue = "") String srcRealName,
			  @RequestParam(name="note", defaultValue = "") String note);
	  
	  @RequestMapping(value=ApiConstant.USER_SERVICE_USERACCOUNT_GETACCOUNTTYPENAME, method = RequestMethod.GET)
	  public ApiRestResponse<String> getAccountTypeName(
			  @RequestParam(name="typeId", defaultValue = "") Integer typeId);
}
